﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Dukou.Security.Dao;
using Dukou.Security.Domain;

namespace Dukou.Security.Test.Dao
{
    [TestFixture]
    public class TestUserDao : TestCase
    {
        public IUserDao UserDao { get; set; }

        [Test]
        public void Test()
        {
            Assert.IsNotNull(this.UserDao);
        }

        [Test]
        public void TestFindById()
        {
            User user = this.UserDao.FindById(1);
            Assert.IsNotNull(user);
            Console.WriteLine(user.Name);
        }

        [Test]
        public void TestFindByName()
        {
            User user = this.UserDao.FindByName("administrator");
            Assert.IsNotNull(user);
            Console.WriteLine(user.Name);
        }


        [Test]
        public void TestFindByEmail()
        {
            User user = this.UserDao.FindByEmail("matt.fang@live.cn");
            Assert.IsNotNull(user);
            Console.WriteLine(user.Name);
        }
    }
}
